package cn.ming.wfchat.app.me.activity.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.ming.wfchat.R;
import cn.ming.wfchat.app.me.activity.model.RedPageListBean;
import cn.ming.wfchat.app.utils.ImageLoaderUtil;

public class RedPageListAdapter extends BaseQuickAdapter<RedPageListBean.ListBean, BaseViewHolder> {

    public RedPageListAdapter(List<RedPageListBean.ListBean> data) {
        super(R.layout.item_red_page, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RedPageListBean.ListBean item) {
        helper.setText(R.id.tv_name, item.getDisplayName());
        ImageLoaderUtil.display(helper.getView(R.id.iv_img), item.getPortrait());
        helper.setText(R.id.tv_amount, item.getAmount() + " FJ");
        helper.setText(R.id.tv_cny, "≈" + item.getCnyAmount() + "CNY");
        helper.setText(R.id.tv_timer, item.getCreateTime());
    }
}
